package com.rerun.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.rerun.entity.vo.ResumeTemplateParam;
import com.rerun.entity.Resume;
import com.rerun.entity.vo.ParkResumeVo;
import com.rerun.vo.park.InteviewResumeVo;
import com.rerun.vo.park.ParkResumeSearchVo;
import com.rerun.vo.park.ReceivedResumeVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * The interface Resume mapper.
 *
 * @author dax.
 * @version v1.0
 * @since 2017 /9/29 9:23
 */
public interface ResumeMapper extends BaseMapper<Resume> {

    /**
     * 获取无账户简历.
     *
     * @return the list
     */
    List<Resume> selectWhoNoAccount();

    /**
     * 获取用户的简历.
     *
     * @param memberId the member id
     * @return the resume
     */
    Resume selectByMemberId(String memberId);

    /**
     * 根据手机号码获取简历
     *
     * @param phone the phone
     * @return resume resume
     */
    Resume selectByPhoneNumber(String phone);

    /**
     * 获取简历详情.
     *
     * @param memberId the member id
     * @return the resume template param
     */
    ResumeTemplateParam selectResumeDetailByMemberId(String memberId);

    /**
     * Select resume list page list.
     *
     * @param page           the page
     * @param resumeSearchVo the resume search vo
     * @return the list
     */
    List<ParkResumeVo> selectResumeListPage(Page<ParkResumeVo> page, ParkResumeSearchVo resumeSearchVo);

    /**
     * Resume all detail resume.
     *
     * @param memberId the member id
     * @return the resume
     */
    Resume resumeAllDetail(@Param(value = "memberId") String memberId);

    /**
     * Select collect resumes page page.
     *
     * @param page   the page
     * @param parkId the park id
     * @return the page
     */
    List<ParkResumeVo> selectCollectResumesPage(Page<ParkResumeVo> page, @Param(value = "parkId") String parkId);

    /**
     * 收到简历
     *
     * @param page   the page
     * @param parkId the park id
     * @return list list
     */
    List<ReceivedResumeVo> receivedResumeListPage(Page<ReceivedResumeVo> page, @Param(value = "parkId") String parkId);

    /**
     * For the interview list page list.
     *
     * @param status the status
     * @param page   the page
     * @param parkId the park id
     * @return the list
     */
    List<InteviewResumeVo> forTheInterviewListPage(@Param(value = "status") String status, Page<InteviewResumeVo> page, @Param(value = "parkId") String parkId);

    /**
     * 显示/隐藏 简历.
     *
     * @param memberId the member id
     * @param status   the status
     * @return the int
     */
    int resumeShowAndHide(@Param("memberId") String memberId, @Param("status") Integer status);

    /**
     * 更新memberId  定时任务专用.
     *
     * @param phoneNumber the phone number
     */
    void updateMemberIdTask(String phoneNumber);

    /**
     * Select phone number no member id list.
     *
     * @return the list
     */
    List<String>  selectPhoneNumberNoMemberId();

    /**
     * Gets resume status num.
     *
     * @param parkId the park id
     * @param status the status
     * @return resume status num
     */
    int getResumeStatusNum(@Param(value = "parkId")String parkId, @Param(value = "status")String status);
}
